#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>

int main()
{
    int fd1=open("log1.txt",O_WRONLY);//打开错误
      int fd2=open("log2.txt",O_WRONLY|O_CREAT);//打开成功
        int fd3=open("log3.txt",O_WRONLY|O_CREAT);//打开成功
          int fd4=open("log4.txt",O_WRONLY|O_CREAT);//打开成功
            int fd5=open("log5.txt",O_WRONLY);//打开错误


              printf("%d\n",fd1);
                printf("%d\n",fd2);
                  printf("%d\n",fd3);
                    printf("%d\n",fd4);
                      printf("%d\n",fd5);

}


